﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CourseList.aspx.cs" Inherits="Admin_Course_CourseList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>课程信息</title>
     <link href="../../css/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="../../css/admin.css" rel="stylesheet" />
    <script src="../../js/jquery-1.7.2.min.js"></script>
    <script src="../../css/assets/js/bootstrap.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div class="row">
                <div runat="server" id="divCondition">
                    <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                        课程名称：
                    <br />
                        <asp:TextBox runat="server" ID="txtCourseName" CssClass="txtSize"></asp:TextBox>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                        课程类型：       
                    <br />
                        <asp:DropDownList runat="server" ID="ddlCourseType" CssClass="txtSize"></asp:DropDownList>                      
                    </div>
                   
                    <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                        是否收费：       
                    <br />
                        <asp:DropDownList runat="server" ID="ddlIsCharge" CssClass="txtSize">  
                           <asp:ListItem Text="全部" Value="0"></asp:ListItem>                
                            <asp:ListItem Text="免费" Value="2"></asp:ListItem>
                            <asp:ListItem Text="收费" Value="1"></asp:ListItem>
                            
                        </asp:DropDownList>
                    </div>

                     <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                       直播录播：       
                     <br />
                        <asp:DropDownList runat="server" ID="ddlIsLive" CssClass="txtSize">  
                           <asp:ListItem Text="全部" Value="0"></asp:ListItem>    
                            <asp:ListItem Text="直播" Value="1"></asp:ListItem>
                            <asp:ListItem Text="录播" Value="2"></asp:ListItem>
                            
                        </asp:DropDownList>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 colSpace" style="margin-top: -2px">
                        <br />
           <asp:Button runat="server" ID="btnSelect" Text="查询" CssClass="btn btn-primary btnSize" OnClick="btnSelect_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
           <asp:HyperLink  runat="server" Text="最热" CssClass="btn btn-primary btnSize" NavigateUrl='Hottest.aspx'> </asp:HyperLink> &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:HyperLink  runat="server" CssClass="btn btn-primary btnSize" NavigateUrl='Newest.aspx'>最新 </asp:HyperLink> 
     
           </div>
            </div>
            </div>
            <br />
            
            <div>
                <asp:GridView runat="server" ID="gridList" CssClass="table table-striped table-bordered table-hover" AutoGenerateColumns="False" DataKeyNames="CourseID"  OnRowDeleting="gridList_RowDeleting" >
                    <Columns>
                        <asp:BoundField DataField="CourseName" HeaderText="课程名称" HeaderStyle-Width="35%"/>
                        <asp:BoundField DataField="CourseTypeName" HeaderText="课程类型" />
                        <asp:BoundField DataField="Price" HeaderText="课程价格" />
                       <%-- <asp:BoundField DataField="JoinCount" HeaderText="参加人数" />--%>
                        <asp:BoundField DataField="ClickCount" HeaderText="点击次数" />
                        <asp:BoundField DataField="StartTime" HeaderText="开始时间" />
                        <%--   <asp:BoundField DataField="IsCharge" HeaderText="课程状态" />--%>

                        <asp:TemplateField HeaderText="是否收费">
                        <ItemTemplate>
                            <%#Eval("IsCharge").ToString() == "1" ? "收费" : "免费"%>
                        </ItemTemplate>
                        </asp:TemplateField>

                        <asp:BoundField DataField="Sort" HeaderText="排序" />

                        <asp:TemplateField HeaderText="状态">
                            <ItemTemplate>
                                <%#Eval("Status").ToString() == "1" ? "正常" : "禁用"%>
                            </ItemTemplate>
                        </asp:TemplateField>

                     <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
           <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "CourseEdit.aspx?CourseID="+Eval("CourseID")%>'>编辑</asp:HyperLink>&nbsp;&nbsp;
          <%-- <asp:LinkButton runat="server" ID="btnUpda" OnClientClick="return confirm('确定删除吗？')" CommandName="Update" CausesValidation="False">删除</asp:LinkButton>--%>                 
        <asp:LinkButton runat="server" ID="LinkButton1" CommandName="Delete" OnClientClick="return confirm('警示：确定删除吗？')" CausesValidation="False"><%#Eval("Status").ToString() == "1" ? "删除" : " "%></asp:LinkButton>        
                          </ItemTemplate>
                         
                    </asp:TemplateField>

                  <asp:TemplateField HeaderText="视频列表">
                           <ItemTemplate>                          
                   <asp:HyperLink ID="btnLow" runat="server" NavigateUrl='<%# "VideoList.aspx?CourseID="+Eval("CourseID")%>'>视频列表 </asp:HyperLink> 
                            </ItemTemplate>
                 </asp:TemplateField>

                    <asp:TemplateField HeaderText="推荐列表">
                            <ItemTemplate>                       
             <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "CommendEdit.aspx?CourseID="+Eval("CourseID")%>'>推荐列表 </asp:HyperLink>                           
                             </ItemTemplate>
                    </asp:TemplateField>

                  <asp:TemplateField HeaderText="评价审核">
                          <ItemTemplate>                                 
                   <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# "Comment.aspx?CourseID="+Eval("CourseID")%>'>评价审核 </asp:HyperLink> 
                          </ItemTemplate>
                    </asp:TemplateField>

                    </Columns>
                </asp:GridView>

            </div>
            <div class="pagerLayout">
                <webdiyer:AspNetPager ID="netPager" CssClass="pagerLayout" runat="server" FirstPageText="首页" LastPageText="尾页"
                    NextPageText="下一页" OnPageChanged="netPager_PageChanged" PrevPageText="上一页"
                    PageSize="15">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </form>
</body>
</html>
